package com.zmwx.wx.handler;

public enum WxChatMassageTypeEnum {
    SUBSCRIBE("event.subscribe","用户关注事件"),//订阅
    TEXT_MSG("text","接收用户文本消息"),//订阅
    UNSUBSCRIBE("event.unsubscribe","取消订阅");//取消订阅
    private  String msgType;
    private  String desc;
    WxChatMassageTypeEnum(String msgType,String desc){
        this.msgType=msgType;
        this.desc=desc;
    }
    public  static WxChatMassageTypeEnum getByMsgType(String msgType){
        for(WxChatMassageTypeEnum wxChatMassageTypeEnum:WxChatMassageTypeEnum.values()){
            if(wxChatMassageTypeEnum.msgType.equals(msgType)){
                return wxChatMassageTypeEnum;
            }
        }
        return null;
    }
}
